interface = {

    host: "http://"+location.host,

    //用户相关
    user: {
        //查询用户数
        register: function (jsonData, callback) {
            AUTOCAR.request({
                url: interface.host + '/user/register',
                contentType: "application/json;charset=UTF-8",
                data: JSON.stringify(jsonData),//JSON.stringify(jsonData),//
                type: 'POST',
                cb: function (data) {
                    callback(data);
                }
            });
        },

        login: function (jsonData, callback) {
            AUTOCAR.request({
                url: interface.host + '/user/login',
                contentType: "application/json;charset=UTF-8",
                data: JSON.stringify(jsonData),//JSON.stringify(jsonData),//
                type: 'POST',
                cb: function (data) {
                    callback(data);
                }
            });
        },
    },


    service : {
        getclassify : function (jsonData, callback) {
            AUTOCAR.request({
                url: interface.host + '/service/getClassify',
                contentType: "application/json;charset=UTF-8",
                data: JSON.stringify(jsonData),//JSON.stringify(jsonData),//
                headers: {
                    Authorization:  window.localStorage.getItem("token")
                },
                type: 'GET',
                cb: function (data) {
                    callback(data);
                }
            });
        },
        getDetailByClassifyid:function (jsonData, callback) {
            AUTOCAR.request({
                url: interface.host + '/service/getDetailByClassifyid',
                contentType: "application/json;charset=UTF-8",
                data: jsonData,//JSON.stringify(jsonData),//
                headers: {
                    Authorization:  window.localStorage.getItem("token")
                },
                type: 'GET',
                cb: function (data) {
                    callback(data);
                }
            });
        }
    }

};